const db = uniCloud.database();
exports.main = async (event, context) => {
  const collection = db.collection('SportRecord');
  const dbCmd = db.command
  let body=event.body
  let body_json=JSON.parse(body)
  let start_date=body_json.start_date
  let end_date=body_json.end_date
  let res = await collection.where({
	  start_time: dbCmd.gte(start_date).and(dbCmd.lte(end_date))
  })
  let records=res.data
  //返回数据给客户端
  return {"status":2, "res_msg":records};

};